
class Pet:

    def __init__(self, name, age):
        self.name = name
        self.age  = age

    def eat(self):
        print('吃')

    def play(self):
        print('玩')


class Dog(Pet):

    def eat(self):
        print('吃骨头')

    def play(self):
        print('睡觉')

class Cat(Pet):

    def eat(self):
        print('吃鱼')

    def play(self):
        print('毛线球')

class Rabbit(Pet):
    pass

class Tiger(Pet):
    pass

class Master:

    def feed(self, Pet):
        print(f'给{Pet.name}吃')



if __name__ == '__main__':

    m = Master()
    d1 = Dog("元宝", 5)
    m.feed(d1)